package main
func main() {
	// 示例：使用学生结构体
	student := Student{Name: "Alice", Age: 20, GPA: 3.5, Major: "Computer Science"}
	student.Print()

	err := student.Modify("age", "21")
	if err != nil {
		log.Fatalf("Failed to modify student: %v", err)
	}
	student.Print()

	// 示例：文件操作
	fileA := "fileA.txt"
	fileB := "fileB.txt"
	data := "This is a test line."

	err = AppendToFile(fileA, data)
	if err != nil {
		log.Fatalf("Failed to append to file: %v", err)
	}

	err = CopyFile(fileA, fileB)
	if err != nil {
		log.Fatalf("Failed to copy file: %v", err)
	}

	err = ReadFile(fileB)
	if err != nil {
		log.Fatalf("Failed to read file: %v", err)
	}
}